package com.ruoyi.eat.service;

import com.ruoyi.eat.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 定时取消超时未支付的订单
 * @description:
 */
@Component
@EnableScheduling
public class AttendTask {


    @Autowired
    private OrderMapper carOrderMapper;
    /***
     *
     * 每天凌晨1点，统计昨日及之前的考勤信息
     * ***/
    @Scheduled(cron = "0/1 * * * * ?")
    void processAttend() {
        carOrderMapper.inValidTimeOrder();
    }





}
